﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;

namespace dis.sys.hw1.Service
{
    public static class Replication
    {
        public const string Root = "/clusters";
        public const string Cluster = Root + "/{0}";
        
        public const string Delegate = Cluster + "/delegate";
        public const string CurrentDelegate = Delegate + "/{1}";

        public const string Hotels = Cluster + "/hotels";
        public const string HotelName = Hotels + "/{1}";
        public const string HotelServer = HotelName + "/{2}";

        //public const string Servers = Cluster + "/servers";
        //public const string SpesificServer = Servers + "/{1}";

        [Serializable]
        public class ServerData
        {
            public string MainHotelName { get; set; }
            public string Address { get; set; }
            public int ActiveCount { get; set; }
            public int BackupCount { get; set; }


            public override string ToString()
            {
                return MainHotelName + "," + Address + "," + ActiveCount + "," + BackupCount;
            }
        }

        [Serializable]
        public class StatsData
        {
            public double MaxStars { get; set; }
            public double MaxRating { get; set; }

        }

    }
}
